/*
 * Depstruct.h
 *
 *  Created on: Dec 18, 2014
 *      Author: Phong
 */

#ifndef DEPSTRUCT_H_
#define DEPSTRUCT_H_

#include <vector>
#include <string>
#include "Dictionary.h"

using namespace std;

class Deptree;

class Depstruct {
public:

	int nWords;
	int *word, *pos, *cap, *head, *deprel, *nDeps;
	int** dep;
	
	int refCount;

	vector<string> tokens;
	
	Depstruct(vector<int*>& input, vector<string>& tks);
	Depstruct* share();

	static Depstruct* create(vector<string>& strlist,
				Dictionary* vocaDic, Dictionary* posDic, Dictionary* deprelDic);
	
	static void free(Depstruct* ds);
	
	Deptree* toDepTree();

	string toString(Dictionary* posDic, Dictionary* deprelDic);

	int toDepTree(int id, int node, Deptree* tree);
	
private:
	
	~Depstruct();
};

#endif /* DEPSTRUCT_H_ */
